/**
 * @Author: gan
 * @Description:
 * @File:  main
 * @Version: 1.0.0
 * @Date: 2022/4/8 2:57 下午
 */

package main

import (
	"gin-canteen-src/core"
	"gin-canteen-src/global"
	"gin-canteen-src/initialize"
	"go.uber.org/zap"
)

func main() {

	// 初始化Viper配置
	global.GloViper = core.Viper()

	// 初始化zap日志库
	global.GloLogger = core.Zap()
	zap.ReplaceGlobals(global.GloLogger)

	// 初始化mysql
	global.GloMysql = initialize.Mysql()
	// 初始redis
	global.GloRedis = initialize.Redis()

	//  初始化定时器
	//initialize.Timer()

	// 运行服务
	core.RunServer()
}
